<template>
	<view class="drafts">
		<view class="drafts_item">
				<view class="item_top">
					<view class="item_title">
						好吃的日本料理到底哪里找？
					</view>
					<view class="item_content">
						区南活方明难老分，位分工北证持是持，打更求材时码。 习清石会五教对办状利，程由已年把即市加引以，动求A认T了对。 
					</view>
				</view>
				<view class="item_buttom">
					<view class="buttom_left">
						<view class="buttom edit">编辑</view>
						<view class="buttom del">删除</view>
					</view>
					<view class="buttom_right">发布文章</view>
				</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				dataList: [],
				access_token:''
			};
		},
		onLoad() {
			if(uni.getStorageSync('access_token')){
			this.access_token=JSON.parse(uni.getStorageSync('access_token'))
			}else{
				uni.navigateTo({
				    url: '/pages/login/login'
				});
			}
			this.$request('/app/user/getDrafts', 'post', {
				page: this.page,
				access_token:this.access_token
			}).then(res => {
				console.log(res)
				this.dataList = res.content
			})
		},
	}
</script>

<style lang="less">
	.drafts{
		height: 100%;
		background: #F3F4F5;
		padding-top: 20rpx;
		.drafts_item{
			background-color: #fff;
			margin-bottom: 20rpx;
			.item_top{
				padding: 20rpx;
				border-bottom:1px solid #EEEEEE;
				.item_title{
					font-size: 32rpx;
					font-family: PingFangSC-Medium, PingFang SC;
					font-weight: 500;
					color: #111111;
					margin-bottom: 20rpx;
				}
				.item_content{
					font-size: 24rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #9DA5A8;
				}
			}
			.item_buttom{
				padding: 30rpx;
				display: flex;
				justify-content: space-between;
				align-items: center;
				.buttom_left{
					display: flex;
					.buttom{
						padding-left: 30rpx;
						font-size: 26rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: #111111;
					}
					.edit{
						background: url(/pagesB/static/edit.png) no-repeat 2rpx 1rpx ;
						background-size: 30rpx 35rpx;
					}
					.del{
						background: url(/pagesB/static/homeImg/icon/search_del@2x.png) no-repeat 4rpx 6rpx;
						background-size: 26rpx 26rpx;
						margin-left: 20rpx;
					}
				}
				.buttom_right{
					font-size: 26rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #DB1B22;
					border-radius: 24rpx;
					border: 1px solid #DB1B22;
					padding: 6rpx 20rpx;
				}
			}
		}
	}
</style>
